package com.tbsoft.ehr.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 工作异动信息对象
 * 
 * @author lizhenhua
 *
 */
@Entity
@Table(name="EHR_TRANSFERINFO")
public class TransferInfo extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 自动增长的主键
	 */
	private String id;
	
	/**
	 * 	档案信息对象
	 */
	private StaffInfo staff;
	
	/**
	 * 异动日期
	 */
	private Date transferDate;
	
	/**
	 * 服务客户
	 */
	private ServiceCustomer sc;
	
	/**
	 * 异动类型
	 */
	private String transferType;
	
	/**
	 * 事由
	 */
	private String remark;

	@Id
	@GeneratedValue(generator="system-uuid")
	@GenericGenerator(name="system-uuid", strategy = "uuid")
	@Column(name="TRANSFER_ID")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name="STAFF_ID")
	public StaffInfo getStaff() {
		return staff;
	}

	public void setStaff(StaffInfo staff) {
		this.staff = staff;
	}

	@Column(name="TRANSFER_DATE",nullable=false,columnDefinition="datetime")
	public Date getTransferDate() {
		return transferDate;
	}

	public void setTransferDate(Date transferDate) {
		this.transferDate = transferDate;
	}

	@ManyToOne
	@JoinColumn(name="SC_ID")
	public ServiceCustomer getSc() {
		return sc;
	}

	public void setSc(ServiceCustomer sc) {
		this.sc = sc;
	}

	@Column(name="TRANSFER_TYPE",nullable=false,length=20)
	public String getTransferType() {
		return transferType;
	}

	public void setTransferType(String transferType) {
		this.transferType = transferType;
	}

	@Column(name="REMARK",length=250)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
}
